package com.ghost.view.chat
{
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.adobe.cairngorm.control.CairngormEventDispatcher;
	import com.ghost.UI.Ghost_TLF_txt;
	import com.ghost.UI.Ghost_txt;
	import com.ghost.interfaces.Ibaseui;
	import com.ghost.model.Global_data;
	import com.ghost.view.Base_effect;
	
	import flash.display.Sprite;
	import flash.text.TextFieldType;

	/**
	 *聊天主场景 
	 * @author ghost
	 * 
	 */
	public class Chat_main extends Base_effect implements Ibaseui
	{
		private var bg:Sprite;
		public function Chat_main()
		{
			bg = new Sprite();
			bg.graphics.beginFill(0xffff34,0.5);
			bg.graphics.drawRect(0,0,300,260);
			bg.graphics.endFill();
			this.addChild(bg);
			var txt:Ghost_TLF_txt = new Ghost_TLF_txt(300,240);
			this.addChild(txt);
			txt.txt_type = TextFieldType.DYNAMIC;
			txt.border = true;
			txt.text = "text";
			var input_txt:Ghost_txt = new Ghost_txt(300,20,null,true);
			this.addChild(input_txt);
			input_txt.y = 240;
			input_txt.txt_type = TextFieldType.INPUT;
			input_txt.border = true;
			input_txt.text = "input_txt";
		}
		private var consult_h:Number=0;
		public function reflash_x_y(e:*):void
		{
			this.x = 0;
			if(this.parent.getChildByName("bottom_exp"))consult_h=this.parent.getChildByName("bottom_exp").height
			this.y = Global_data.stage_s_height-this.height-consult_h;
		}
		public function hide():void
		{
			this.visible = false;
		}
		public function show():void
		{
			this.visible = true;
		}
	}
}